<?php

class Core_Controller_Admin_Settings_Mailtemplate extends Controller
{
    public function actionIndex($request, $response)
    {
        $table = Agis::getTable('core@mail.template');

        $select = $table -> select();

        $this -> paginator = $paginator = Zend_Paginator::factory($select);

        $paginator -> setCurrentPageNumber($request -> getParam('page', 1));
    }

    public function actionEdit($request, $response)
    {
        $this -> form = $form = Agis::getForm('core@admin.settings.mailtemplate.edit');

        if ($request -> isPost() and $form -> isValid($_POST))
        {
            $form -> doCommit();
        }
    }

}
